package hust.music.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * Log4jConfigListsner
 * 
 * @author Txazo
 * @since 1.0
 */
public class Log4jConfigListsner implements ServletContextListener {

	@Override
	public void contextInitialized(ServletContextEvent servletContextEvent) {
		String path = servletContextEvent.getServletContext().getRealPath("/");
		System.setProperty("web.path", path);
	}

	@Override
	public void contextDestroyed(ServletContextEvent servletContextEvent) {
		System.clearProperty("web.path");
	}

}
